﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using OgilvyOne.Model;

namespace OgilvyOne.IDAL
{
    public interface ICmsArticle
    {
        /// <summary>
        /// 新增文章
        /// </summary>
        /// <param name="article"></param>
        /// <returns></returns>
        bool Insert(CmsArticleModel article);
        /// <summary>
        /// 修改文章
        /// </summary>
        /// <param name="article"></param>
        /// <returns></returns>
        bool Update(CmsArticleModel article);
        /// <summary>
        /// 获取文章
        /// </summary>
        /// <param name="aid"></param>
        /// <returns></returns>
        CmsArticleModel getCmsArticle(int aid);
        /// <summary>
        /// 查询文章
        /// </summary>
        /// <param name="caq"></param>
        /// <returns></returns>
        IList getCmsArticleList(CmsArticleQuery caq);
        /// <summary>
        /// 删除文章
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        bool Del(string ids);
        /// <summary>
        /// 修改文章SEO
        /// </summary>
        /// <param name="seo"></param>
        /// <returns></returns>
        bool UpdateSeo(CmsArticleModel seo);
        /// <summary>
        /// 获取文章SEO属性
        /// </summary>
        /// <param name="aid"></param>
        /// <returns></returns>
        CmsArticleModel GetCmsArticelSeo(int aid);
        /// <summary>
        /// 修改文章状态
        /// </summary>
        /// <param name="aid"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        bool UpdateState(int aid, string state, string musername);
        /// <summary>
        /// 审核文章
        /// </summary>
        /// <param name="aid"></param>
        /// <param name="state"></param>
        /// <param name="musername"></param>
        /// <returns></returns>
        bool AudutArticle(int aid, string state, string musername);

        /// <summary>
        /// 修改排序号
        /// </summary>
        /// <param name="aid"></param>
        /// <param name="orderid"></param>
        /// <returns></returns>
        bool ModOrderNum(int aid, int ordernum);
        /// <summary>
        /// 获取栏目当前排序号前或下一文章ID
        /// </summary>
        /// <param name="cid"></param>
        /// <param name="ordernum"></param>
        /// <param name="next">0 上 1 下</param>
        /// <returns></returns>
        int GetOrderArticleId(int cid, int ordernum, int next);
        /// <summary>
        /// 栏目最大排序号
        /// </summary>
        /// <param name="cid"></param>
        /// <returns></returns>
        int MaxOrder(int cid);
    }
}
